branch=$1
commit=$2

if [ -z "$branch" ]; then
    echo "Usage: bake.sh <branch> <version>"
    exit 1
fi

if [ -z "$commit" ]; then
    echo "Usage: bake.sh <branch> <version>"
    exit 1
fi

echo "Baking version $branch-$commit"

echo "VERSION='$branch-$commit'" > backend/version.py
echo "module.exports = '$branch-$commit'" >> frontend/commit_hash.js

echo "Baked version $branch-$commit"